{% extends 'base.html' %}
{%  block title %}用户注册{% endblock %}
{% block body %}
    <div class="jumbotron text-center">
      <h1>注册</h1>
      <p>注册及同意《用户注册手册》</p>
    </div>
      <form class="form-signin text-center container" action="/add_user/" method="POST" style="width: 60%">

          <input type="text" name="username" class="form-control" placeholder="用户名" required>
          <input type="email" name="email" class="form-control" placeholder="邮箱" required autofocus>
          <input type="password" name="passwords" class="form-control" placeholder="密码" required>
          <input type="password" name="password" class="form-control" placeholder="在次输入密码" required>
          <button id="seb_btn" onclick="add()" class="btn btn-lg btn-primary  btn-block"  type="submit" data-loading-text="Loading...">注册</button>
          <div  id="loa" class="spinner-border text-primary" role="status" style="display: none">
              <span class="sr-only">Loading...</span>
          </div>
      </form>
    <script>
    function add(){
        document.getElementById("seb_btn").style.display="none";
        document.getElementById("loa").style.display="";
        setTimeout(load, 14000);
    }
    function load(){
        document.getElementById("seb_btn").style.display="";
        document.getElementById("loa").style.display="none";
        }
    </script>

{% endblock %}
